[bits 32]
section .text

selector_code equ (1 << 3)

extern _kernel_init
extern _device_init
extern _interrupt_init
extern _memory_init
extern _gdt_init

global _start
_start:    
    push ebx
    push eax
    call _interrupt_init
    call _device_init
    call _gdt_init

    jmp dword selector_code:next

next:
    call _memory_init  ; 初始化内存管理
    call _kernel_init  ; 初始化内核

    jmp $